SET(LIB_NAME osgdb_potree)
SET(TARGET_H  Attributes.h json.hpp)
SET(TARGET_SRC  ReaderWriterPotree.cpp)
FIND_PACKAGE(OSG)



include_directories(${OSG_INCLUDE_DIR})

add_library(${LIB_NAME} SHARED ${TARGET_H} ${TARGET_SRC})

target_link_libraries( ${LIB_NAME} ${OSG_LIBRARY})
target_link_libraries( ${LIB_NAME} ${OSGDB_LIBRARY})
target_link_libraries( ${LIB_NAME} ${OSGUTIL_LIBRARY})
target_link_libraries( ${LIB_NAME} ${OPENTHREADS_LIBRARY})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set_target_properties(${LIB_NAME} PROPERTIES CXX_STANDARD 17)
set_target_properties(${LIB_NAME} PROPERTIES DEBUG_POSTFIX "d")

INSTALL(TARGETS ${LIB_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
                                    LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
                                    ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)






